package animal7_2;

public class TestAnimal {
	public static void main(String[] args) {
		Cat cat1 = new Cat();
		cat1.greeting();
		Dog dog1 = new Dog();
		dog1.greeting();
		BigDog bigDog1 = new BigDog();
		bigDog1.greeting();
		System.out.println("----------------");

		Animal animal1 = new Cat();
		animal1.greeting();
		Animal animal2 = new Dog();
		animal2.greeting();
		Animal animal3 = new BigDog();
		animal1.greeting();
		// Animal animal = new Animal();
		System.out.println("--------------");

		Dog dog2 = (Dog) animal2;
		BigDog bigDog2 = (BigDog) animal3;
		Dog dog3 = (Dog) animal3;
		//Cat cat2 = (Cat) animal2;
		dog2.greeting(dog3);
		dog3.greeting(dog2);
		dog2.greeting(bigDog2);
		bigDog2.greeting(dog2);
		bigDog1.greeting(bigDog1);

	}
}
